import http
from urllib import request

from urllib3 import HTTPResponse

# # 网页下载
# url = "http://www.baidu.com"
# request.urlretrieve(url, '百度.html')  # 下载存入的文件后缀要与下载的一致

# # 下载图片
# request.urlretrieve(
#     "https://pics5.baidu.com/feed/b8014a90f603738d8b34be21f3baad5ff919ece2.jpeg@f_auto?token=f37da3ccaef4d350f28bffe32787318f",\
#     "明星.png")


# 下载视频
src = "https://vd2.bdstatic.com/mda-qfdajcd0ai5g450y/540p/h264_cae_acd/1718350841827688425/mda-qfdajcd0ai5g450y.mp4"
request.urlretrieve(src, "视频.mp4")
